﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/SecretaryMaster.Master" AutoEventWireup="true" CodeBehind="Crear.aspx.cs" Inherits="Interfaces.Acta.Crear" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 38px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script>
        function Count(text) {
            //asp.net textarea maxlength doesnt work; do it by hand
            var maxlength = 200; //set your value here (or add a parm and pass it in)
            var object = document.getElementById(text.id)  //get your object
            if (object.value.length > maxlength) {
                object.focus(); //set focus to prevent jumping
                object.value = text.value.substring(0, maxlength); //truncate the value
                object.scrollTop = object.scrollHeight; //scroll to the end to prevent jumping
                return false;
            }
            return true;
        }
    </script>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="Panel1" runat="server" GroupingText="Crear acta" 
                style="text-align: center">
                <asp:Label ID="NroLabel" runat="server" Text="Acta Nro:"></asp:Label>
                <br />
                <asp:Label ID="FechaLabel" runat="server" Text="Fecha:"></asp:Label>
                <br />
                <br />
                <table style="width:100%;">
                    <tr>
                        <td class="style1">
                            &nbsp;</td>
                        <td>
                            <asp:DataList ID="DataList1" runat="server" >
                                <HeaderTemplate>
                                    <tr style="color: #000000">
                                        <td bgcolor="#3a67b1" style="border:2px solid #123456;">
                                            Punto</td>
                                        <td bgcolor="#3a67b1" style="border:2px solid #123456;">
                                            Nombre</td>
                                        <td bgcolor="#3a67b1" style="border:2px solid #123456;">
                                            Contenido</td>
                                    </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr style="color: #000000">
                                        <td style="border:2px solid #123456;">
                                            <asp:Label ID="NumeroPunto" runat="server" Text='<%# Eval("NumeroPunto") %>'></asp:Label>
                                        </td>
                                        <td style="border:2px solid #123456;">
                                            <asp:Label ID="NombreDePunto" runat="server" 
                                                Text='<%# Eval("NombreDePunto") %>'></asp:Label>
                                        </td>
                                        <td style="border:2px solid #123456;" width="500">
                                            <asp:TextBox ID="TextBox1" runat="server" Columns="60" MaxLength="200" Rows="5" TextMode="MultiLine" Text='<%# Eval("Contenido") %>' onKeyUp="javascript:Count(this);" onChange="javascript:Count(this);"></asp:TextBox>
                                        </td>
                                        
                                    </tr>
                                </ItemTemplate>
                            </asp:DataList>
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
                <asp:Label ID="LabelError" runat="server" style="color: #FF3300" ></asp:Label>
                <br />
                <br />
                <asp:Button ID="ButtonGuardar" runat="server" Text="Guardar" onclick="ButtonGuardar_Click" CssClass="JCIstyle"
                   />
                <br />
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div _designerregion="0">
    </div>
</asp:Content>
